<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<s:if test="type==1">
	<title>个人贷款审查</title>
	<span id="navlink">贷款审批 >> 个人贷款审查</span>
</s:if>
<s:elseif test="type==2">
	<title>企业贷款审查</title>
	<span id="navlink">贷款审批 >> 企业贷款审查</span>
</s:elseif>

<script type="text/javascript" src="<%=request.getContextPath()%>/js/creditCheck/creditExamineS.js"></script>
<s:div id="msg"></s:div>
<s:form action="creditExamineAction" method="post">
	<s:hidden name="type" value="%{#request.type}" />
	<s:div id="left_area">
		<input type="radio" name="searchwhat" id="searchwhatw" <s:if test="searchwhat==1">checked="checked"</s:if>/><label for="searchwhatw">等待</label>
		<input type="radio" name="searchwhat" id="searchwhatd" <s:if test="searchwhat==2">checked="checked"</s:if>/><label for="searchwhatd">完成</label>
		<input type="radio" name="searchwhat" id="searchwhatb" <s:if test="searchwhat==3">checked="checked"</s:if>/><label for="searchwhatb">未通过</label>
		<input type="radio" name="searchwhat" id="searchwhatr" <s:if test="searchwhat==4">checked="checked"</s:if>/><label for="searchwhatr">上级返回</label>
	</s:div>
</s:form>
<br/>
<div id="top_area">
	<input type="button" id="search" value="查找" />
</div>
<br/>
<br/>
<s:form action="creditExamineAction" id="form">

	<table class="table_box table_bottom_border">
		<tr>
			<s:if test="isDone!=2">
				<th><b>操作</b></th>
			</s:if>
			<th><b>申请单编号</b></th>
			<th><b>客户名称</b></th>
			<th><b>申请金额</b></th>
			<th><b>申请日期</b></th>
			<th><b>借款日期</b></th>
			<th><b>状态</b></th>
			<th><b>编辑/查看</b></th>
		</tr>
		<s:iterator value="creditExamineBeanList" status="index" var="var">
			<tr>
				<s:if test="isDone!=2">
					<td align="center"><s:checkbox name="isExamine" id="isExamine"
							fieldValue="%{applyid}" />
					</td>
				</s:if>
				<td align="center"><s:if test="#request.type==1">RFG</s:if><s:elseif test="#request.type==2">RFQ</s:elseif>${applyid }</td>
				<td align="center">${customName }</td>
				<td align="right"><s:text name="f.money">
						<s:param value="applyMoney" />
					</s:text></td>
				<td align="center"><s:text name="f.date.ymd">
						<s:param name="value" value="applyDate" />
					</s:text></td>
				<td align="center"><s:text name="%{applyTime}"/>
					<s:text name="%{applyTimeType}" /></td>
				<td align="center"><span>${applyStateStr}</span>
				</td>
				<td align="center"><a href="creditExamineAction!applyExamine?type=${type}&isCanChange=${isCanChange}&applyid=${applyid}">${buttonStateStr}</a>
				</td>
		</s:iterator>
	</table>
	<div id="button_area"><div class="pagebar"></div></div>
	<br>
	<br>
	<s:if test="isDone!=2">
		<s:div>
			<table class="table_box table_all_border">
				<tr>
					<th style="width:150px">请选择审查人员</th>
					<td><s:radio list="examineUserList" name="examinePeople"
							id="examinePeople" listKey="userId" listValue="userName" /></td>
				</tr>
			</table>
		</s:div>
		<s:div id="button_area">
			<s:submit value="设定审查人员" method="getExamine" />
		</s:div>
	</s:if>
</s:form>
<script type="text/javascript">
<!--
	$("#search").click(function() {
		$("#dialog-search").dialog({
			resizable : false,
			modal : true
		});
	});

	$(function() {
		$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
		$('#createtime').datetimepicker({
			dateFormat : "yy-mm-dd",
			showTimepicker : false,
			changeMonth : true,
			changeYear : true
		});
	});
	
	$("#searchwhatw").click(function(){
		location.href="creditExamineAction!cdw?type=${type}";
	});
	$("#searchwhatd").click(function(){
		location.href="creditExamineAction!cdd?type=${type}";
	});
	$("#searchwhatb").click(function(){
		location.href="creditExamineAction!cdb?type=${type}";
	});
	$("#searchwhatr").click(function(){
		location.href="creditExamineAction!cdr?type=${type}";
	});
//-->
</script>

<s:div id="dialog-search" style="display:none" title="查询">
	<s:form action="creditExamineAction!searchList" method="get">
		<s:hidden name="operateState" value="%{#request.operateState}" />
		<s:hidden name="type" value="%{#request.type}" />
			申请单编号：<s:textfield name="searchApplyid"></s:textfield>
		<s:div style="float:right">
			<s:submit value="查询" />
		</s:div>
	</s:form>
</s:div>